package com.bwie.controller;

import com.bwie.utils.R;
import com.bwie.vo.QueryVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author 军哥
 * @version 1.0
 * @description: TODO
 * @date 2025/7/17 16:56
 */

@RestController
@RequestMapping(value = "/day1/index")
@Slf4j
public class IndexController {

    /**
     * @description 测试接口，路径传参+json传参
     * @params [pageNum, pageSize, queryVo]
     * @return com.bwie.utils.R
     * @author 军哥
     * @date 2025/7/17 17:17
     */
    @PostMapping("/getUserList/{pageNum}/{pageSize}")
    public R getUserList(@PathVariable("pageNum") Integer pageNum, @PathVariable("pageSize") Integer pageSize, @RequestBody @Validated QueryVo queryVo) {
        log.info("pageNum=" + pageNum);
        log.info("pageSize=" + pageSize);
        log.info("queryVo=" + queryVo);

        return R.OK(queryVo);
    }

}
